package com.lancoo.znbkxx.teacher.utils

import android.os.Build
import android.text.Html
import android.text.Spanned

/**
 * @author : wealive
 * @date   : 2020/6/9 21:10
 * @desc   :
 */
class HtmlUtils {
    companion object {
        fun setText(text: String): Spanned {
            return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
                Html.fromHtml(text, Html.FROM_HTML_MODE_COMPACT)
            } else {
                Html.fromHtml(text)
            }
        }
    }
}